# !/bin/bash
repo_addr='crpi-u8oio35yqulzsvao.cn-qingdao.personal.cr.aliyuncs.com/easy-chat-zxh/user-rpc-dev'
tag='latest'

#设置环境变量，userRPC服务实际运行ip地址，使容器ip与服务器ip相同
pod_ip="1.94.147.80"

container_name="easy-chat-user-rpc-test"

docker stop ${container_name}

docker rm ${container_name}

docker rmi ${repo_addr}:${tag}

docker pull ${repo_addr}:${tag}


# 如果需要指定配置文件的
# docker run -p 10001:8080 --network imooc_easy-chat -v /easy-chat/config/user-rpc:/user/conf/ --name=${container_name} -d ${repo_addr}:${tag}
docker run -p 10000:10000 -e POD_IP=${pod_ip} --name=${container_name} -d ${repo_addr}:${tag}
